<?php
class Aro extends AppModel{
	var $name = 'Aro';
	var $useTable = 'aros';
	var $primaryKey = 'id';
	var $displayField = 'alias';
	var $recursive = 1;
	
	var $hasAndBelongsToMany = array(
		'ArosAcos' => array(
			'className' => 'Aco',
			'joinTable' => 'aros_acos',
			'with' => 'ArosAcos',
			'foreignKey' => 'aro_id',
			'associationForeignKey' => 'aco_id'
		)	
	); 
	
	var $belongsTo = array(
		'ParentAro' => array(
			'className' => 'Aro',
			'foreignKey' => 'parent_id'
		)
	);
	
	var $hasMany = array(
		'ChildrenAros' => array(
			'className' => 'Aro',
			'foreignKey' => 'parent_id'
		)
	);
}